﻿<html>
<head><title>下拉选择2</title>
<script src="angular.min.js"></script>
</head>
<body>
    <div ng-app="myApp" ng-controller="mc">
        <select ng-model="selectedCar" ng-options="y.brand for (x, y) in cars">
        </select> 
        
            <p>你选择的是: {{selectedCar.brand}}</p>
            <p>型号为: {{selectedCar.model}}</p>
            <p>颜色为: {{selectedCar.color}}</p>
       
    </div>

<script>
  var app = angular.module('myApp', []);
  app.controller('mc', function($scope) {
    $scope.cars = {
        car01 : {brand : "Ford", model : "Mustang", color : "red"},
        car02 : {brand : "Fiat", model : "500", color : "white"},
        car03 : {brand : "Volvo", model : "XC90", color : "black"}
    }
});
</script>


</body>

</html>